CxTrsEditor Methods
The CxTrsEditor object contains the following methods:
Connect
The Connect method connects to a TRS.
Syntax
Connect(DomainSiteService As String)
Parameters
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. A domain is optional. The service must be a valid TRS. |
Example
The following example creates and connects the CxTrsEditor object.
|
Sub Dim TrsEditor Set TrsEditor = CreateObject("CxEditors.CxTrsEditor") TrsEditor.Connect("[5410]CYGDEMO.TRS") End Sub |
Copy
The Copy method launches a New Table Entry dialog box initialized with the information in the specified record.
Syntax
Copy(QueueKey As String) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to copy. |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Table Entry dialog box for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") Dim iRet iRet= TrsEditor.Copy(iKey) MsgBox iRet End Sub |
Delete
The Delete method launches a Delete Entry dialog box initialized with the information in the specified record.
Syntax
Delete(QueueKey As String) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to delete. |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a Delete Entry dialog box for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") Dim iRet iRet= TrsEditor.Delete(iKey) MsgBox iRet End Sub |
Disconnect
The Disconnect method disconnects from the connected TRS service.
Syntax
Disconnect()
Example
The following example disconnects the TrsEditor object.
|
Sub TrsEditor.Disconnect End Sub |
Edit
The Edit method launches a Properties dialog box for the specified record.
Syntax
Edit(QueueKey As String) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
QueueKey |
Yes |
The database queue key of the record to edit. |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a property sheet for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") Dim iRet iRet= TrsEditor.Edit(iKey) MsgBox iRet End Sub |
Find
The Find method returns the database queue key by table name and table entry for the specified record.
Syntax
Find(TableName As String, TableEntry As String) As String
Parameters
| Parameter | Required | Description |
|---|---|---|
| TableName | Yes | The name of the table. |
| TableEntry | Yes | The name of the table entry. |
Remarks
Example
The following example finds the database queue key for entry "0" of table "COMSTATE."
|
Sub Dim iKey iKey = TrsEditor.Find("COMSTATE", "0") MsgBox iKey End Sub |
New
The New method launches a New Table Entry dialog box.
Syntax
New() As Integer
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |
Example
The following example launches a New Table Entry dialog box.
|
Sub Dim iRet iRet= TrsEditor.New MsgBox iRet End Sub |
View
The View method launches a Properties dialog box for the specified record.
Syntax
View(Key as String, EditEnabled As Boolean) As Integer
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Key |
Yes |
The database queue key of the record to edit. |
| EditEnabled | Yes |
Remarks
This method returns one of the following values:
| -1 or 0 | An error occurred. | |
|
1 |
OK button was pressed. | |
| 2 | Cancel button was pressed. |


